﻿@using Super.Entities;
@model List<DiyOrder>
@using Super.Infrastructure;
@using Super.DomainService;
@using Super.Common;
@{
    ViewBag.Title = "产品库存管理";
    
}
<div class="pageHeader">
    <form id="pagerForm" rel="pagerForm" onsubmit="return navTabSearch(this);" action="/admin/diy/index" method="post">
    <div class="searchBar">
        <ul class="searchContent">
            <li>
                @Html.DWZTextBox("keyword", "关键词【订单号、用户名、联系电话】：")
            </li>
            <li><label>入库时间大于：</label> <input id="startTime" name="startTime" class="date" alt="请选择起始日期！" /> </li>
        </ul>
        @Html.SubBar()
    </div>
    <input type="hidden" name="pageNum" value="1" /><!--【必须】value=1可以写死-->
    </form>
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <li><a class="delete" href="/admin/diy/delete?id={sid_user}" target="ajaxTodo" title="确定要删除吗？" warn="请选择一个用户"><span>删除</span></a></li>
            <li><a class="edit" href="/admin/diy/edit?id={sid_user}" target="navTab" mask="true" height="600" warn="请选择一个产品"><span>修改</span></a></li>
            <li><a class="icon" href="/admin/diy/buy?id={sid_user}" target="navTab" mask="true" height="600" warn="请选择一个产品"><span>出单</span></a></li>
        </ul>
    </div>
    <div layouth="116" id="w_list_print">
        <table class="list" width="98%" targettype="navTab" asc="asc" desc="desc">
            <thead>
                <tr>
                    <th width="80">订单编号</th>
                    <th width="200">名称</th>
                    <th width="50">用户</th>
                    <th width="50">总价</th>
                    <th width="50">支付金额</th>
                    <th width="50">让利</th>
                    <th width="100">类型</th>
                    <th width="100">支付时间</th>
                    <th width="100">备注</th>
                    <th width="100" >创建时间</th>
                </tr>
            </thead>
            <tbody>
                @foreach (var item in Model)
                {
                    <tr target="sid_user" rel="@item.ID">
                        <td>@item.OrderNo</td>
                        <td>@item.Name</td>
                        <td>
                            @{
                    if (item.User != null)
                    {
                                <span>@item.User.Name</span>
                    }
                            }
                        </td>
                        <td>@item.Price</td>
                        <td>@item.PayMoney</td>
                        <td>@item.LetMoney</td>
                   
                        <td>
                            @{
                                var show = typeof(DiyOrderTypeEnum).GetItemShow(item.Type);
                                <span>@show</span>
                            }
                        </td>
                             <td>@item.PayTime</td>
                        <td>@item.Remark</td>
                        <td>@item.CreateTime</td>
                    </tr>
                }
            </tbody>
        </table>
    </div>
    <div class="panelBar">
        <div class="pages">
            <span>共 @ViewBag.RecordCount 条</span>
        </div>
        <div class="pagination" targettype="navTab" totalcount="@ViewBag.RecordCount" numperpage="@ViewBag.PageSize" pagenumshown="10" currentpage="@ViewBag.PageIndex">
        </div>
    </div>
</div>
